/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.plt.be;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Administrador
 */
@Entity
@Table(name = "PLT_CONTRATO_RETENCION")
@NamedQueries({@NamedQuery(name = "ContratoRetencion.findAll", query = "SELECT c FROM ContratoRetencion c"), @NamedQuery(name = "ContratoRetencion.findByIdContratoRetencion", query = "SELECT c FROM ContratoRetencion c WHERE c.idContratoRetencion = :idContratoRetencion"), @NamedQuery(name = "ContratoRetencion.findByFechaRegistro", query = "SELECT c FROM ContratoRetencion c WHERE c.fechaRegistro = :fechaRegistro"), @NamedQuery(name = "ContratoRetencion.findByFechaEntrega", query = "SELECT c FROM ContratoRetencion c WHERE c.fechaEntrega = :fechaEntrega"), @NamedQuery(name = "ContratoRetencion.findByDescripcion", query = "SELECT c FROM ContratoRetencion c WHERE c.descripcion = :descripcion")})
public class ContratoRetencion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_CONTRATO_RETENCION")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long idContratoRetencion;
    @Column(name = "FECHA_REGISTRO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaRegistro;
    @Column(name = "FECHA_ENTREGA")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaEntrega;
    @Column(name = "DESCRIPCION")
    private String descripcion;

    public ContratoRetencion() {
    }

    public ContratoRetencion(Long idContratoRetencion) {
        this.idContratoRetencion = idContratoRetencion;
    }

    public Long getIdContratoRetencion() {
        return idContratoRetencion;
    }

    public void setIdContratoRetencion(Long idContratoRetencion) {
        this.idContratoRetencion = idContratoRetencion;
    }

    public Date getFechaRegistro() {
        return fechaRegistro;
    }

    public void setFechaRegistro(Date fechaRegistro) {
        this.fechaRegistro = fechaRegistro;
    }

    public Date getFechaEntrega() {
        return fechaEntrega;
    }

    public void setFechaEntrega(Date fechaEntrega) {
        this.fechaEntrega = fechaEntrega;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idContratoRetencion != null ? idContratoRetencion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ContratoRetencion)) {
            return false;
        }
        ContratoRetencion other = (ContratoRetencion) object;
        if ((this.idContratoRetencion == null && other.idContratoRetencion != null) || (this.idContratoRetencion != null && !this.idContratoRetencion.equals(other.idContratoRetencion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.plt.be.ContratoRetencion[idContratoRetencion=" + idContratoRetencion + "]";
    }

}
